import request from '@/utils/request'

// 查询物资报警列表
export function listElecWarning(query) {
  return request({
    url: '/elec/elecWarning/list',
    method: 'get',
    params: query
  })
}

// 查询资产盘点主列表
export function listElecMaterialWarningDetails(query) {
  return request({
    url: '/elec/elecWarningDetail/list',
    method: 'get',
    params: query
  })
}

// 查询物资报警详细
export function getElecWarning(warningId) {
  return request({
    url: '/elec/elecWarning/' + warningId,
    method: 'get'
  })
}

// 新增物资报警
export function addElecWarning(data) {
  return request({
    url: '/elec/elecWarning',
    method: 'post',
    data: data
  })
}

// 修改物资报警
export function updateElecWarning(data) {
  return request({
    url: '/elec/elecWarning',
    method: 'put',
    data: data
  })
}

// 删除物资报警
export function delElecWarning(warningId) {
  return request({
    url: '/elec/elecWarning/' + warningId,
    method: 'delete'
  })
}
